<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<jsp:include page="/common.jsp"></jsp:include>
<script type="text/javascript">
	$(function(){
	 	selectItem('unit','${t.unit}','unit');
	 	selectItem('materielKind','${t.type}','type');
	});
</script>
</head>
<body>
${title }
<form id="form" class="form-inline well" action="warehouse?saveMateriel" method="post">
		<input type="hidden" name="id" value="${t.id }">
			<label><span class="span1">编码:</span>
				<input type="text" name="code" class="input-medium" value="${t.code }">
			</label>
			<label><span class="span1">名称:</span>
				<input type="text" name="name" class="input-medium" value="${t.name }">
			</label>
			<label><span class="span1">单位:</span>
				<%-- <input type="text" name="unit" class="input-medium" value="${t.unit }"> --%>
				<select name="unit" id="unit"></select>
			</label>
			<label><span class="span1">库存分类:</span>
				<%-- <input type="text" name="type" class="input-medium" value="${t.type }"> --%>
				<select name="type" id="type"></select>
			</label>
			<div class="control-group">
                <div class="controls">
                    <c:if test="${status==view}">
                        <button class="btn btn-primary" type="submit">保存</button>
                    </c:if>
                    <a class="btn btn-primary" onclick="go('storem/warehouse?list')">返回</a>
                </div>
         	</div>
	</form>
	<jsp:include page="/foot.jsp"></jsp:include>
</body>
</html>